package inputDemo;

import java.io.*;

public class Demo9 {
    public static <outputStreamWriter> void main(String[] args) throws IOException {
        try (OutputStream outputStream = new FileOutputStream("d:/test.txt");
             OutputStreamWriter outputStreamWriter = new OutputStreamWriter(outputStream,"utf-8");
             PrintWriter printWriter = new PrintWriter(outputStreamWriter)) {
            printWriter.println("我是第一行");
            printWriter.print("我的第⼆⾏\r\n");
            printWriter.printf("%d: 我的第三⾏\r\n", 1 + 1);
            printWriter.flush();
        }
    }
}
